<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <table border="1">
        <thead>
            <tr>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>成绩</th>
            </tr>
        </thead>
        <tbody>
            
            <% for(let i=0;i<stu.length;i++){  %>

                <tr>
                    <td> <%= stu[i].name %> </td>
                    <td> <%= stu[i].age %> </td>
                    <td> <%= stu[i].sex %> </td>
                    <td> <%= stu[i].score %> </td>
                </tr>
            <% } %>


            <% stu.forEach(item=>{ %>
                <tr>
                    <td> <%= item.name %> </td>
                    <td> <%= item.age %> </td>
                    <td> <%= item.sex %> </td>
                    <td> <%= item.score %> </td>
                </tr>


             <%  }) %>

                
     

            
          
        </tbody>

    </table>





</body>
</html>